package com.bjx.generator.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @desc: 表字段实体
 * @author: liushuai
 * @date: 2022/9/17 11:26
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("gen_table_field")
@Schema(title = "TableFieldEntity",description = "表字段实体")
public class TableFieldEntity {
    /**
    * 字段id
    */
    @TableId(type = IdType.AUTO)
    @Schema(title = "fieldId",description = "表字段id")
    private Long fieldId;

    /**
    * 表id
    */
    @Schema(title = "tableId",description = "表id")
    private Long tableId;

    /**
    * 字段名称
    */
    @Schema(title = "fieldName",description = "字段名称")
    private String fieldName;

    /**
    * 字段描述
    */
    @Schema(title = "fieldDesc",description = "字段描述")
    private String fieldDesc;

    /**
    * 字段类型
    */
    @Schema(title = "fieldType",description = "字段类型")
    private Short fieldType;

    /**
    * 字段长度
    */
    @Schema(title = "fieldLength",description = "字段长度")
    private Integer fieldLength;

    /**
    * 是否唯一
    */
    @Schema(title = "onlyKey",description = "是否唯一")
    private Short onlyKey;

    /**
    * 是否主键
    */
    @Schema(title = "primaryKey",description = "是否主键")
    private Short primaryKey;

    /**
    * 是否可以为空
    */
    @Schema(title = "emptyKey",description = "是否可以为空")
    private Short emptyKey;

    @Schema(title = "queryBol",description = "是否为查询字段")
    private Short queryBol;

    @Schema(title = "listBol",description = "是否为列表字段")
    private Short listBol;

    @Schema(title = "insertBol",description = "是否为插入字段")
    private Short insertBol;

    @Schema(title = "updateBol",description = "是否为修改字段")
    private Short updateBol;

    @Schema(title = "screen",description = "筛选条件(1等于/2大于/3/小于/4模糊/5大于等于/6小于等于)")
    private Short screen;

    @Schema(title = "params",description = "扩展参数")
    private String params;

    @Schema(title = "componentType",description = "组件类型")
    private String componentType;

    @Schema(title = "dictTypeCode",description = "字典类型编号")
    private String dictTypeCode;



}